package com.hs.android.fortress.ingame;

import android.view.View;
import android.widget.ImageButton;
import android.widget.ImageView;

public class MissailButtonClicked {

	MissailState firstMissailState;
	MissailState secondMissailState;
	private MissailState state;
	private ImageButton mMissailButton1;
	private ImageButton mMissailButton2;
	private ImageView mMissailShooted;
	private int tankId;
	
	public MissailButtonClicked(ImageButton mMissailButton1, ImageButton mMissailButton2 , int tankId) {
		firstMissailState= new FirstMissailState(this);
		secondMissailState = new SecondMissailState(this);
		this.tankId=tankId;
		this.mMissailButton1=mMissailButton1;
		this.mMissailButton2=mMissailButton2;
		state=secondMissailState;
		
		state.fMissailBtnClicked(mMissailButton1, mMissailButton2, tankId);
	}
	public MissailButtonClicked(ImageView mMissailShooted){
		this.mMissailShooted=mMissailShooted;
		state=firstMissailState;
	}
	
	public MissailState getState() {
		return state;
	}
	public void setState(MissailState state) {
		this.state = state;
	}
	void firstMissailClicked(){
		state.fMissailBtnClicked(mMissailButton1, mMissailButton2 ,tankId);
	}
	void secondMissailClicked(){
		state.sMissailBtnClicked(mMissailButton1, mMissailButton2 ,tankId);
	}
}
